<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	<div id="box">
		<p v-if="show">{{message}}</p>
		<input v-model="message" type="text"/>
		<button type="button" @click="check(message)">点击查看</button>
	</div>
	<script type="text/javascript">
		new Vue(
			{
				el:'#box',
				data:{
					show:false,
					message:''
				},
				methods:{
					check:function(message){
						this.show=true;
						alert("message="+message);
					}
				}
			}
		);
	</script>
	</body>
</html>
